<?php

class BShopSkuModelKey extends BaseModel
{
    public $res;
    public $expire;

    public function getSource()
    {
        return "b_shop_sku_model_key";
    }

    public function getDetails($mid){
        $where = "m_id = $mid";
        $list = $this->find($where)->toArray();
        $result = array();
        if(!empty($list)){
            $valDb = new BShopSkuValue();
            $ids = implode(',',array_column($list,'k_id'));
            $result = $valDb->keyValueList($ids);
        }
        return $result;
    }
}
